#register-pane.login-box.tab-pane.rounded.active{ role: 'tabpanel' }
  .login-body
    = gitlab_ui_form_for(resource, as: "new_user", url: group_sign_up_path(@unauthenticated_group), html: { class: "new_new_user gl-show-field-errors", "aria-live" => "assertive" }) do |f|
      .devise-errors
        = devise_error_messages!

      .d-flex.flex-column.align-items-center.mt-3.mx-3
        .avatar-container.rect-avatar.s64.home-panel-avatar.mb-3
          = group_icon(@unauthenticated_group, class: 'avatar avatar-tile s64', width: 64, height: 64)
        %p.text-center
          = html_escape(_("Finish setting up your dedicated account for %{group_name}.")) % { group_name: tag.strong(@group_name) }

      .form-group
        = f.label :email, class: 'label-bold'
        = f.email_field :email, class: "form-control", required: true, disabled: true

      .name.form-group
        = f.label :name, _('Full name'), class: 'label-bold'
        = f.text_field :name, class: "form-control top js-block-emoji", required: true, disabled: resource.name.present?

      .username.form-group
        = f.label :username, class: 'label-bold'
        = f.text_field :username, class: "form-control js-block-emoji", pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, required: true, title: _("Please create a username with only alphanumeric characters.")
        %p.validation-error.hide= _('Username is already taken.')
        %p.validation-success.hide= _('Username is available.')
        %p.validation-pending.hide= _('Checking username availability...')

      = render 'enforce_terms'

      = render 'devise/shared/email_opted_in', f: f

      - if current_user
        %p.text-center= _("You'll be signed out from your current account automatically.")
        .d-flex.justify-content-center

          = render 'user_info'

        .submit-container
          = f.submit _("Sign out & Register"), pajamas_button: true
      - else
        .submit-container
          = f.submit _("Register"), pajamas_button: true
